-
Couldn't load subscription status.
- Fork 0
refactor topology infos and create new endpoint #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Etienne LESOT <[email protected]>
| return feederBayInfos; | ||
| } | ||
|
|
||
| private static TopologyInfos.TopologyInfosBuilder<?, ?> createDefaultTopologyInfosBuilder() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create an empty object nope ? This can return false data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghazwarhili what do you think ?
| int maxBusbarIndex = 1; | ||
| int maxSectionIndex = 1; | ||
| boolean busbarSectionPositionFound = true; | ||
| for (BusbarSection bbs : voltageLevel.getNodeBreakerView().getBusbarSections()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be nice to have a dedicated method for busbarSectionInfos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's not the purpose of the PR
| } | ||
|
|
||
| @GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/topology", produces = APPLICATION_JSON_VALUE) | ||
| @Operation(summary = "Get topology description for a voltage level") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Get the voltage level topology description" or "Fetch the topology information for a voltage level"
|
|
||
| @GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/topology", produces = APPLICATION_JSON_VALUE) | ||
| @Operation(summary = "Get topology description for a voltage level") | ||
| @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "topology description")}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Network topology information retrieved"
| private List<SwitchKind> switchKinds; | ||
|
|
||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| private Boolean isRetrievedBusbarSections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attribute name isRetrievedBusbarSections is unclear and does not accurately reflect the data it represents,
so we decided to rename it.
I suggest isSymmetricalVoltageLevel or something else
| private Boolean isRetrievedBusbarSections; | ||
|
|
||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| private Boolean isBusbarSectionPositionFound; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isBusbarSectionPositionFound to isBusbarSectionPositionExtensionFound maybe ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isBusbarSectionPositionExtensionFound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
| private Boolean isBusbarSectionPositionFound; | ||
|
|
||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| private Map<String, List<String>> busBarSectionInfos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
busBarSectionInfos to busBarSectionsInfos
Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
Signed-off-by: Etienne LESOT <[email protected]>
|
| private List<SwitchKind> switchKinds; | ||
|
|
||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| private Boolean isRetrievedBusbarSections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep the attributes
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer busbarCount;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer sectionCount;
@JsonInclude(JsonInclude.Include.NON_NULL)
private List<SwitchKind> switchKinds;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isSymmetrical;
in the VoltageLevelFormInfos class, otherwise we break the voltage level creation and modification forms
| "id": "VLNEW2", | ||
| "topologyKind": "BUS_BREAKER", | ||
| "substationId": "P1", | ||
| "nominalV": 225.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this changes ?
|
#303 I'd like to propose this PR for the refacto |



No description provided.